package com.sf.fy.uav.common.request.pricing;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author LTQ
 */
@Data
public class PricingEditRequest {

    private String id;

    private String takeoffCode;

    private String landingCode;

    private String takeoffName;

    private String landingName;

    private Integer startHour;

    private String processedBy;

    private Integer endHour;

    private BigDecimal price;
    /**
     * 基础重量或基础距离增加附属条件
     */
    private List<PricingRuleRange> pricingRuleRangeArray;

    /**
     * 特殊定价集合
     */
    private List<SpecialPricingReq> specialPricingReqList;

    @ApiModelProperty("产品类型")
    private Byte productType;

    @ApiModelProperty("产品类型名称")
    private String productTypeName;


    @Data
    public static class PricingRuleRange{
        /**
         *定价规则表主键id
         */
        private String pricingRuleId;
        /**
         * 重量还是距离定价类型
         */
        private Byte type;
        /**
         * 是否是删除
         */
        private Integer delNum;
        /**
         * 基础重量or基础距离
         */
        private BigDecimal baseNum;

        private List<WeightOrDistance> weightOrDistanceList;
        @Data
        public static class WeightOrDistance{
            /**
             * 定价规则范围明细主键id
             */
            private String pricingRuleRangeId;

            private Byte rangeTypes;
            /**
             * 起始重量or起始距离
             */
            private BigDecimal startNum;
            /**
             * 最大重量or最大距离
             */
            private BigDecimal endNum;
            /**
             * 加价金额
             */
            private BigDecimal markupPrice;
            /**
             * 排序字段
             */
            private Integer sort;
        }
    }
}
